﻿using Umbraco.Framework;
using Umbraco.Framework.Persistence.Model.Attribution.MetaData;
using Umbraco.Framework.Persistence.Model.Constants.AttributeDefinitions;
using Umbraco.Hive.Providers.WordPress.Schema.Model.AttributeDefinitions;
using Umbraco.Hive.Providers.WordPress.Schema.Model.AttributeGroups;
using NodeNameAttributeDefinition = Umbraco.Hive.Providers.WordPress.Schema.Model.AttributeDefinitions.NodeNameAttributeDefinition;

namespace Umbraco.Hive.Providers.WordPress.Schema.Model
{
    public class PostSchema : EntitySchema
    {
        public const string SchemaAlias = "wp-post-schema";

        public PostSchema()
            : base(SchemaAlias, "A WordPress Post")
        {
            Id = new HiveId(1);
            AttributeDefinitions.Add(new NodeNameAttributeDefinition());
            AttributeDefinitions.Add(new ContentAttributeDefinition());
            AttributeDefinitions.Add(new AuthorAttributeDefinition());
            AttributeDefinitions.Add(new SelectedTemplateAttributeDefinition(new PostDetailsAttributeGroup()));
        }
    }
}
